<?php
//session_start();
//include "../public/common/common.php";
//if(!isset($_SESSION['home_userid'])){
//	echo '<script>location="login.php"</script>';
//	exit;
//}
?>
<div class="header">
	<div class="headerLogo">
		<a href="">
			<img src=""/>
		</a>
	</div>
	<div class="headerLeft">
		<span>
			Myshop1商城
		</span>
	</div>
	<div class="headerRight">
		<a href="<?php echo $root?>/home/index.php">首页</a>
		<?php
		if(isset($_SESSION['home_userid'])){
			echo "<span>{$_SESSION['home_username']}</span><a href='{$root}/home/logout.php'>退出</a>";
		}else{
			echo "<a href='{$root}/home/login.php'>登录</a>";
		}
		?>
		<a href="<?php echo $root?>/home/register.php">注册</a>
		<a href="<?php echo $root?>/home/person/index.php">个人中心</a>
		<a href="<?php echo $root?>/home/cart/index.php">购物车</a>
	</div>
</div>